<?php

class mysql
{
	private $connex;
	private $serv;
	private $base;
	private $user;
	private $pwd;
	
	public function __construct($s, $b, $u, $p)
	{
		$this->connex = null;
		$this->serveur = $s;
		$this->base = $b;
		$this->user = $u;
		$this->pwd = $p;
	}
	
	public function connect()
	{
		$this->connex = mysql_connect($this->serv, $this->user, $this->pwd);
		mysql_select_db($this->base, $this->connex);
	}
	
	public function disconnect()
	{
		mysql_close($this->connex);
	}
}

?>